<table width="100%" border="0" cellspavpageng="0" cellpadding="4">
  <tr>
    <td><table border="0" cellspavpageng="0" cellpadding="4" {if $cat.added}bgcolor="#BBDFC0"{/if}>
        <tr>
          <td width="1"><span style="white-space:nowrap">{$cat.title}</span></td>
          <td>
			{if $cat.added}          
          		<a href="admin/modules/tangra_cms/vpage/vpage_categories.php?vpage={$vpage_id}&amp;remove={$cat.added}" {popup text="Unlink vpage item from this category"}>
                <img src="/img/modules/crystal_icons_small/16x16/delete.png" alt="remove category" border="0"/>
               	</a>
            {else}
          		<a href="admin/modules/tangra_cms/vpage/vpage_categories.php?vpage={$vpage_id}&amp;add={$cat.id}" {popup text="Link vpage item to this category"}>            
            	<img src="/img/modules/crystal_icons_small/16x16/add.png" alt="add category" border="0"/>
             {/if}</td>
        </tr>
      </table></td>
  </tr>
  {if $cat.subcategories}
  <tr>
    <td><table width="100%" border="0" cellspavpageng="0" cellpadding="0">
        {foreach from=$cat.subcategories item=subcat}
        <tr>
          <td width="1">&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td>{include file="modules/tangra_cms/pages/_vpage/en/vpage_categories/category_row.tpl" cat=$subcat}</td>
        </tr>
        {/foreach}
      </table></td>
  </tr>
  {/if}
</table>
